Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-1969: Add "Read Online" functionality for UP items #505

Merged
merged 12 commits into from
Jul 18, 2024

Conversation

jackiequach
Copy link
Collaborator

@jackiequach jackiequach commented Jul 10, 2024

Jira Ticket

This PR does the following:

  • Adds "Read Online" functionality for University Press items by passing custom fetcher to the web reader

Testing requirements & instructions:

Copy link

vercel bot commented Jul 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sfr-bookfinder-front-end ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 7:03pm

@kylevillegas93
Copy link
Contributor

Nice work! Logic looks good. I'll wrap up my review tomorrow.

@@ -220,4 +221,39 @@ export default class EditionCardUtils {
: undefined;
return universityPress !== undefined;
}

static createGetContent = (nyplIdentityCookie: any, router: NextRouter) => {
const fetchWithAuth = async (fulfillUrl: string, proxyUrl?: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this code could be reused to call other endpoints that need authentication besides the fulfill endpoint?

I think it's fine to keep it like this for now but we could consider abstracting this out to use with other endpoints later on.

Copy link
Contributor

@kylevillegas93 kylevillegas93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on the logic - but will leave the rest to the frontend squad

Copy link

@oliviawongnyc oliviawongnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a couple small comments, but going ahead and approving.

src/util/EditionCardUtils.tsx Outdated Show resolved Hide resolved
src/components/ReaderLayout/ReaderLayout.tsx Show resolved Hide resolved
@jackiequach jackiequach merged commit 1b55f06 into development Jul 18, 2024
7 checks passed
@jackiequach jackiequach deleted the SFR-1969/web-reader-custom-fetcher branch July 18, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants